<script type="text/javascript">
$(function(){
	var pg = App.base.serverView.ui, pp = pg.params || {};
	
	function setValues(o) {
		pg.seek('code').text(o.code);
		pg.seek('name').text(o.name);
		pg.seek('group').text(o.group);
		pg.seek('ip').text(o.ip);
		pg.seek('memo').text(o.memo);
		pg.seek('env').text(o.env);
		// pg.seek('projId').text('');
		pg.seek('status').text(Cache.base.server.status[o.status]);
		pg.seek('type').text(Cache.base.server.type[o.type]);
	}
	if (pp.name) {
		setValues(pp);
	} else if (pp.id) {
		var w = mac.wait('Loading...');
		$.get(App.ctx + '/server/get.do', {
			id: pp.id
		}, function(rs) {
			w.close();
			var ro = mac.eval(rs);
			if (ro.success) {
				setValues(ro.data);
			}
		});
	}
	pg.seek('close').click(pg.close);
});
</script>
<div class="form">
	<div class="item">
		<span class="label">编码：</span>
		<div class="value" name="code"></div>
		<div class="clear"></div>
	</div>
	<div class="item">
		<span class="label">名字：</span>
		<div class="value" name="name"></div>
		<div class="clear"></div>
	</div>
	<div class="item">
		<span class="label">服务器类型：</span>
		<div class="value" name="type"></div>
		<div class="clear"></div>
	</div>
	<div class="item">
		<span class="label">Ip：</span>
		<div class="value" name="ip"></div>
		<div class="clear"></div>
	</div>
	<div class="item">
		<span class="label">组别：</span>
		<div class="value" name="group"></div>
		<div class="clear"></div>
	</div>
	<div class="item">
		<span class="label">环境：</span>
		<div class="value" name="env"></div>
		<div class="clear"></div>
	</div>
	<div class="item">
		<span class="label">备忘录：</span>
		<div class="value" name="memo"></div>
		<div class="clear"></div>
	</div>
	<div class="item">
		<span class="label">&nbsp;</span>
		<div name="msg" class="msg"></div>
		<div class="clear"></div>
	</div>
	<div class="bottom buttonTop">
		<button name="close" class="addBtn">关闭</button>
	</div>
</div>